package com.ryenlii.datatrans.core.kafka;

import com.ryenlii.datatrans.core.constant.TopicConst;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;

// @Component
public class KafkaClientDemo {

    @KafkaListener(topics = TopicConst.PLATFORM_SEND_CITY_DATA, containerFactory = "kafkaListenerContainerFactory")
    public void onMessage(ConsumerRecord<String, Object> message) {
        System.out.println("topic:" + message.topic() + "，消费消息：" + message.value());
    }
}